package com.shanzhe.eshop.order.service.impl;

import com.shanzhe.eshop.common.util.ResultBean;
import com.shanzhe.eshop.order.pojo.OrderDTO;
import com.shanzhe.eshop.order.mapper.OrderMapper;
import com.shanzhe.eshop.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author yinwei
 * @create 2021/9/30
 * @Version 1.0
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    OrderMapper orderMapper;

    /**
     * 获取订单列表
     * @param orderId
     * @return
     */
    @Override
    public ResultBean<OrderDTO> listOrders(Long orderId) {
         List<OrderDTO> orderDTOS = orderMapper.listOrders();
        return ResultBean.success(orderDTOS);
    }
}
